<div class="right">
  <div></div>
  <div id="columns1">
    <div class="nav">
      <form action="<?=$this->config->item('site_url');?>search/showkeyword" method="post" onsubmit="return selectdatesearch();" name="date_search_form">
        <ul>
          <li <?php if ($search_day ==0){ ?>class="current" <?php } ?>><span><a href="<?=$this->config->item("site_url");?>search/showkeyword">今日</a></span></li>
          <li <?php if ($search_day ==1){ ?>class="current" <?php } ?>><span><a href="<?=$this->config->item("site_url");?>search/showkeyword?search_day=1">昨日</a></span></li>
          <li <?php if ($search_day ==7){ ?>class="current" <?php } ?>><span><a href="<?=$this->config->item("site_url");?>search/showkeyword?search_day=7">最近七天</a></span></li>
          <li <?php if ($search_day ==30){ ?>class="current" <?php } ?>><span><a href="<?=$this->config->item("site_url");?>search/showkeyword?search_day=30">最近三十天</a></span></li>
          <li><span>从</span></li>
          <li><span class="demo">
            <input type="text" size="10" maxlength="8" readonly="readonly" value="<?=$search_sdate?>" id="datepicker" name="search_sdate">
            </span></li>
          <li><span>到</span></li>
          <li><span class="demo">
            <input type="text" id="datepicker1" size="10" value="<?=$search_edate?>" maxlength="8" name="search_edate">
            </span></li>
          <li class="lineNone"><span>
            <input type="button" value="查看" style="border: 1px #FFFFFF solid; background: #efefef;style=cursor:pointer" onclick="selectdatesearch()">
            </span></li>
        </ul>
      </form>
    </div>
    <ul id="column2" class="main">
      <li class="widget1 color-green1" id="widget12">
        <div class="widget1-head">
          <h3> 关键词统计图 </h3>
        </div>
        <div id="chartdiv" class="widget1-content" style="'height: 230px;" ></div>
      </li>
      <li class="widget1 color-green1" id="widget13">
        <div class="widget1-head">
          <h3>关键词统计</h3>
        </div>
        <div class="widget1-content">
          <table cellspacing="0" cellpadding="0">
            <tr>
              <th> 关键词 </th>
              <th> 搜索次数 </th>
              <th> 独立访客 </th>
              <th> 独立IP </th>
              <th> 平均停留时间(s) </th>
              <th width="200px;"> 搜索比例 </th>
            </tr>
            <?php if(empty($data)){?>
            <tr>
              <td colspan="7"><center>
                  <font color=red>无数据</font>
                </center></td>
            </tr>
            <? }else{
foreach(@$data as $key=>$val):?>
            <tr>
              <td><?=$key?>
              </td>
              <td><?=$val['total_arrives']?>
              </td>
              <td><?=$val['total_vids']?>
              </td>
              <td><?=$val['total_ips']?>
              </td>
              <td><?=$val['avg_arriveTimes']?>
              </td>
              <td><img width="<?=$val['avg_arrives']?>%" border="0" height="10" src="<?=$this->config->item("img_url")?>bar1.gif" style="float:left;"><br><span style="float:right;"><?=$val['avg_arrives']?>%</span></td>
            </tr>
            <?php endforeach;
}?>
          </table>
        </div>
      </li>
    </ul>
  </div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?=$this->config->item('chart_url');?>JSClass/FusionCharts.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
   var chart = new FusionCharts("<?=$this->config->item('chart_url');?>Charts/Pie3D.swf", "ChartId", "852", "350", "0", "0");
   chart.setDataXML('<?=$xml?>');
   chart.render("chartdiv");
});
</script>
<script type="text/javascript" src="<?=$this->config->item('js_url');?>date.js"></script>
